<?php

		$username = "shop"; 	// username for recoengine web service
    		$password = "sh0p";     // password for recoengine web service
    		$skuId = "Plan 299";    // skuId -> hardcode for now.
		$rest_path = "http://50.18.175.149/dataanalysis/index.php/recommendation/"; // URL for recoengine web service
		
		$curl_handle = curl_init();  
		curl_setopt($curl_handle, CURLOPT_URL, $rest_path.'getRecommendedItemBySkuId/format/json');
		curl_setopt($curl_handle, CURLOPT_USERPWD, $username.':'.$password); // Authentication using username and password
		curl_setopt($curl_handle, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
		curl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, false);  
		curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);  
		curl_setopt($curl_handle, CURLOPT_POST, 1);  
		curl_setopt($curl_handle, CURLOPT_POSTFIELDS, array(  
		    "skuId" => $skuId
		)); // Set the parameter using post
		  
		$buffer = curl_exec($curl_handle);  
		curl_close($curl_handle);
		$result = json_decode($buffer);


?>